package top.lyjwn.ajui.widget.recycler.base;

import android.content.Context;
import android.util.AttributeSet;

import com.yanzhenjie.recyclerview.SwipeRecyclerView;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.RecyclerView;

public class IRecyclerView extends SwipeRecyclerView {

    private double scale = 0.75; //抛掷速度的缩放因子

    public IRecyclerView(@NonNull Context context) {
        super(context);
    }

    public IRecyclerView(@NonNull Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    public boolean fling(int velocityX, int velocityY) {
        velocityX *= scale;
        velocityY *= scale;
        return super.fling(velocityX, velocityY);
    }

}
